import QtQuick 1.0

Rectangle {
    id: container

    width: 360
    height: 640
    color: "darkgray"

    Rectangle {
        id: rectangle1
        anchors {
            top: parent.top
            left: parent.left
            right: parent.right
        }
        height: parent.height/3

        color: "red"

        Text {
            anchors.centerIn: parent
            text: "TOP"
            font.pixelSize: 24
        }
    }

    Rectangle {
        id: rectangle2
        anchors {
            top: rectangle1.bottom
            bottom: rectangle3.top
            left: parent.left
            right: parent.right
        }
        color: "green"

        Text {
            anchors.centerIn: parent
            text: "MIDDLE"
            font.pixelSize: 24
        }
    }

    Rectangle {
        id: rectangle3
        anchors {
            bottom: parent.bottom
            left: parent.left
            right: parent.right
        }
        height: parent.height/3
        color: "blue"
        Text {
            anchors.centerIn: parent
            text: "BOTTOM"
            font.pixelSize: 24
        }
    }

    MouseArea {
        anchors.fill:  parent
        onClicked: Qt.quit();
    }
}
